lxIn = 987
p = (1-1/(1 + ((lxIn + 0.13)/142.29)^(-3.945)));
ran = rand(1);
if p > ran
    state = 1
    lxOut = lxIn + 500
else
    state = 0
    lxOut = lxIn 
end


